[POWERPC][XEN] /chosen/cpu is an instance not a package
authorJimi Xenidis <jimix@watson.ibm.com>
Mon, 18 Sep 2006 21:47:10 +0000 (17:47 -0400)
committerJimi Xenidis <jimix@watson.ibm.com>
Mon, 18 Sep 2006 21:47:10 +0000 (17:47 -0400)
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : %83%94%E6gH%D0%3B%DE%237%DF%3A%D2%BA%8B%E5%9C%F3%92%B5

xen/arch/powerpc/boot_of.c

index f80e1074ff873b5e4948c28f5e68e918dde1cf44..3b85018cc0da055655ae496b55eac0b9bc81a217 100644 (file)
@@ -957,8 +957,9 @@ static void boot_of_module(ulong r3, ulong r4, multiboot_info_t *mbi)
 
 static int __init boot_of_cpus(void)
 {
-    int cpus_node;
-    int cpu_node, bootcpu_node, logical;
+    int cpus_node, cpu_node;
+    int bootcpu_instance, bootcpu_node;
+    int logical;
     int result;
     s32 cpuid;
     u32 cpu_clock[2];
@@ -967,9 +968,13 @@ static int __init boot_of_cpus(void)
     /* Look up which CPU we are running on right now and get all info
      * from there */
     result = of_getprop(bof_chosen, "cpu",
-                        &bootcpu_node, sizeof (bootcpu_node));
+                        &bootcpu_instance, sizeof (bootcpu_instance));
     if (result == OF_FAILURE)
-        of_panic("Failed to look up boot cpu\n");
+        of_panic("Failed to look up boot cpu instance\n");
+
+    bootcpu_node = of_instance_to_package(bootcpu_instance);
+    if (result == OF_FAILURE)
+        of_panic("Failed to look up boot cpu package\n");
 
     cpu_node = bootcpu_node;